package com.lagou.esweb.mvc.web;

import com.lagou.esweb.common.Response;
import com.lagou.esweb.mvc.doc.PositionDoc;
import com.lagou.esweb.mvc.service.PositionService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@RequestMapping("position")
public class PositionController {

    final PositionService positionService;

    @PostMapping("list")
    public Response<List<PositionDoc>> list(@RequestParam() String positionName) {
        return positionService.list(positionName);
    }

}
